import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts

Rectangle {
    Layout.fillWidth: true
    Layout.fillHeight: true

    ScrollView {
        id: scrollView
        anchors.fill: parent
        anchors.margins: 10
        clip: true

        TextArea {
            id: darkTextArea
            width: scrollView.width
            placeholderText: "暗色主题的文本区域"

            // 暗色主题样式
            color: "#e0e0e0"
            selectionColor: "#4CAF50"
            selectedTextColor: "#ffffff"
            placeholderTextColor: "#808080"

            background: Rectangle {
                color: "#333333"
                border.color: darkTextArea.activeFocus ? "#4CAF50" : "#555555"
                radius: 4
            }
        }
    }
}
